package com.xiaoma.test;

import com.xiaoma.api.HelloObject;
import com.xiaoma.api.HelloService;
import com.xiaoma.client.RpcClientProxy;
import com.xiaoma.client.SocketClient;

/**
 * @Author: xiaoma
 * @Date: 2021/7/5 13:57
 * @description: 测试用消费者（客户端）
 */
public class SocketTestClient {
    public static void main(String[] args) {
        SocketClient socketClient = new SocketClient();
        RpcClientProxy proxy = new RpcClientProxy(socketClient);
        HelloService helloService = proxy.getProxy(HelloService.class);
        HelloObject helloObject = new HelloObject(12, "This is a message");
        String res = helloService.hello(helloObject);
        System.out.println(res);
    }
}
